package route

type RouteForm struct {
	Id             int64        `form:"id" json:"id" binding:"min=0"`
	RouteNamespace string       `form:"route_namespace" json:"route_namespace" binding:"required,max=20"`
	RouteName      string       `form:"route_name" json:"route_name" binding:"required,min=3,max=20"`
	RouteHost      string       `form:"route_host" json:"route_host" binding:"required,min=3,max=100"`
	RoutePath      []*RoutePath `form:"route_path" json:"route_path" binding:"required,min=1"`
}

type RoutePath struct {
	Id                      int64  `form:"id" json:"id" binding:"min=0"`
	RouteId                 int64  `form:"route_id" json:"route_id" binding:"min=0"`
	RoutePathName           string `form:"route_path_name" json:"route_path_name" binding:"required,min=1"`
	RouteBackendService     string `form:"route_backend_service" json:"route_backend_service" binding:"required,min=1"`
	RouteBackendServicePort int32  `form:"route_backend_service_port" json:"route_backend_service_port" binding:"omitempty,min=1"`
}
